POV-Ray : Newsgroups : povray.advanced-users : Align box to splines : Re: Align box to splines Server Time
5 May 2024 18:26:01 EDT (-0400)
  Re: Align box to splines  
From: Peter Popov
Date: 25 Sep 2002 01:48:26
Message: <l3j2pu02gocibkq3jkd9ngrtef5q4fu27o@4ax.com>
On Tue, 24 Sep 2002 13:06:16 -0400, "Greg M. Johnson"
<gregj:-)565### [at] aolcom> wrote:

>Q: How do I get the four corners of W&L to be aligned as closely as possible
>to the two curves?

You can fit them on the splines with a matrix, assuming that not only
the distance between the splines is constant, but the vector itself
(i.e. if you get rid of the vlength() in your definition, it should
still yield a constant value)

There was a macro that transforms one triangle into another - I just
can't tell you the name of the macro itself. If you define the
original triangle from the first three of the four bottommost corners
of your box, and the new triangle as follows,

triangle { S1=Spline_1(Val), S2=Spline_2(Val), S3=Spline_2(Val+L) }

then that macro will move and shear your box into position.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.